package com.example.apollofight.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <B>主类名称：</B>HelloController<BR>
 * <B>概要说明：</B>查看配置变动的实例Controller<BR>
 *
 * @author wenhao.zhao
 * @since 2021年08月19日 上午 8:52
 */
@Controller
public class HelloController {

    @Value("${server.version}")
    String version;

    @Value("${server.desc}")
    String desc;

    @Value("${server.common}")
    String common;

    @ResponseBody
    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    public String hi(String name) {
        return "hi " + name + " ,this application version is :" + version
                + " the description is: " + desc
                + "the common properties is:" + common;
    }

}
